<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h2>{{money}}</h2>
        <h2>转美元：{{money | change(this.d.dollar)}}</h2>
        <h2>转人人民币：{{money | change(this.d.yuan)}}</h2>
    </div>

    <script src="js/vue.js"></script>
    <script>
        let app = new Vue({
            el:"#app",
            data:{
                "money":1234,
                d:{dollar:"$",yuan:"￥"}
            },
            filters:{
                "change":function(val,el){
                    return el+val;
                }  
            }
        })
    </script>
</body>
</html>